package com.example.zcl.system.result;

/**
 * @desc: --返回对象工具类
 * @author: Bing
 * @date: 2025-05-29 16:51
 */
public class ResultUtil {

    /**
     * 成功返回
     */
    public static <T> Result<T> success() {
        return Result.success();
    }

    public static <T> Result<T> success(T data) {
        return Result.success(data);
    }

    public static <T> Result<T> success(String message, T data) {
        return Result.success(message, data);
    }

    /**
     * 失败返回
     */
    public static <T> Result<T> fail() {
        return Result.fail();
    }

    public static <T> Result<T> fail(String message) {
        return Result.fail(message);
    }

    public static <T> Result<T> fail(Integer code, String message) {
        return Result.fail(code, message);
    }

    public static <T> Result<T> fail(ResultCode resultCode) {
        return Result.fail(resultCode);
    }
}

